void main(List<String> args) {
  //Child child = Child('kate');
  // Child child1 = Child.create(20);
  Animal animal = Animal('鸡' , 2);
  print(animal.name);
  print(animal.legs);
  Animal dog = Animal.productDog(4);
  print(dog.name);
  print(dog.legs);
}
class Father {
  Father(s){
    print('father......$s');
  }
  // Father.create(s){
  //   print('create');
  // }
}
class Child extends Father {
  Child(name):super(name){
    print('child......$name'); //先调用父类的无参构造，再调用自己的。
  }
  Child.create(int a):super(a){
    print('child........$a');  //父类有参构造需要显示的：调用父类定义的构造方法
  }
}

class Animal {
  String name = 'gou';
  int legs;
  Animal(this.name,this.legs);
  Animal.productDog(int legs):this('Dog',legs);
  Animal.createCat(name):this('Cate',4);
}